package com.ruoyi.system.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.StoreSettingsMapper;
import com.ruoyi.system.domain.StoreSettings;
import com.ruoyi.system.service.IStoreSettingsService;

import java.util.List;

/**
 * 门店设置Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-07
 */
@Service
public class StoreSettingsServiceImpl extends ServiceImpl<StoreSettingsMapper, StoreSettings> implements IStoreSettingsService
{
    @Autowired
    private StoreSettingsMapper storeSettingsMapper;

    /**
     * 通过id查询门店设置
     *
     * @param id 门店设置主键
     * @return 门店设置
     */
    @Override
    public StoreSettings selectStoreSettingsById(Long id)
    {
        return storeSettingsMapper.selectStoreSettingsById(id);
    }

    /**
     * 查询门店设置列表
     *
     * @param storeName 门店名称
     * @return 门店设置
     */
    @Override
    public List<StoreSettings> selectStoreSettingsListByName(String storeName)
    {
        return storeSettingsMapper.selectStoreSettingsListByName(storeName);
    }

    /**
     * 新增门店设置
     *
     * @param storeSettings 门店设置
     * @return 结果
     */
    @Override
    public int insertStoreSettings(StoreSettings storeSettings)
    {
        return storeSettingsMapper.insertStoreSettings(storeSettings);
    }

    /**
     * 修改门店设置
     *
     * @param storeSettings 门店设置
     * @return 结果
     */
    @Override
    public int updateStoreSettings(StoreSettings storeSettings)
    {
        return storeSettingsMapper.updateStoreSettings(storeSettings);
    }

    /**
     * 通过id批量删除门店设置信息
     *
     * @param ids 需要删除的门店设置主键
     * @return 结果
     */
    @Override
    public int deleteStoreSettingsByIds(Long[] ids)
    {
        return storeSettingsMapper.deleteStoreSettingsByIds(ids);
    }

    /**
     * 通过id删除门店设置信息
     *
     * @param id 门店设置主键
     * @return 结果
     */
    @Override
    public int deleteStoreSettingsById(Long id)
    {
        return storeSettingsMapper.deleteStoreSettingsById(id);
    }
}
